import request from "../../utils/request.js";
//集中管理
//查询流程模型列表
export const getWorkFlowList_Api = (query) => {
  return request({
    method: "get", //请求方式
    url: "/workflow/model/new/list", //请求地址
    params: query, //请求参数 参数是对象
  });
};
//查询紧急程度为1的流程模型
export const getWorkFlowOneList_Api = (query) => {
  return request({
    method: "get", //请求方式
    url: "/workflow/model/one/emergent", //请求地址
    params: query, //请求参数 参数是对象
  });
};
//查询紧急程度为1的流程模型
export const getWorkFlowProcessList_Api = (query) => {
  return request({
    method: "get", //请求方式
    url: "/workflow/process/list", //请求地址
    params: query, //请求参数 参数是对象
  });
};





// /**
//  * 审核中知识库列表
//  * @param {*} query 
//  * @returns 
//  */
// export const getRunningList_Api = (query) => request.get("/workflow/process/knowledge/data/running/list", {
//   params: query
// })
// /**
//  * 审核完成知识库列表
//  * @param {*} query 
//  * @returns 
//  */
// export const getCompletedList_Api = (query) => request.get("/workflow/process/knowledge/data/completed/list", {
//   params: query
// })



/**
 * 新的启动流程
 * @param {*} data 
 * @returns 
 */
export const addKnowledge_Api = (data) => request.post("/workflow/process/new/start", data)

/**
 * 新的流程部署接口
 * @param {*} data 
 * @returns 
 */
export const newDeploy_Api = (data) => request.post("/workflow/model/new/deploy", data)
/**
 * 知识库关联列表查询
 * @param {*} query 
 * @returns 
 */
export const getKnowledgeRelationList_Api = (query) => request.get("/workflow/process/knowledge/base/list", {
  params: query
})
/**
 * 查询知识库表单
 * @param {*} query 
 * @returns 
 */
export const getKnowledgeForm_Api = (query) => request.get("/workflow/process/knowledge/base/form", {
  params: query
})


//知识库列表最新接口
export const getKnowledgeList_Api = (query) => request.get("/workflow/knowledge/list", {
  params: query
})


//知识库详情接口
export const getKnowledgeDetail_Api = (id) => request.get("/workflow/knowledge/" + id)

